package com.qiaofang.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qiaofang.common.model.BaseDomain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 楼盘信息
 **/
@Data
@Entity
@Table(name = "tm_premises")
public class Premises extends BaseDomain {

    @ApiModelProperty("主键")
    @Column(name = "id")
    private Long id;

    @ApiModelProperty("城区")
    @Column(name = "area_id")
    private Long areaId;

    @ApiModelProperty("商圈")
    @Column(name = "business_circles_id")
    private Long businessCirclesId;

    @ApiModelProperty("楼盘名称")
    @Column(name = "name")
    private String name;

    @ApiModelProperty("物业类型:[{estate_type:[住宅,商住,商铺,网点,写字楼,厂房,写厂,铺厂,仓库,地皮,车位,其它]}]")
    @Column(name = "estate_type")
    private String estateType;

    @ApiModelProperty("建筑类别:[{building_type:[多层,高层,小高层,多层复式,高层复式,多层跃式,高层跃式,独立别墅,联体别墅,双拼别墅,裙楼,四合院]}]")
    @Column(name = "building_type")
    private String buildingType;

    @ApiModelProperty("装修状况:[{decoration_type:[毛坯,清水,简装,中装,精装,豪装]}]")
    @Column(name = "decoration_type")
    private String decorationType;

    @ApiModelProperty("环线位置:[{position_type:[内环以内,内环与中环之间,中环与外环之间,外环以外]}]")
    @Column(name = "position_type")
    private String positionType;

    @ApiModelProperty("")
    @Column(name = "feature")
    private String feature;

    @ApiModelProperty("容积率")
    @Column(name = "plot_ratio")
    private String plotRatio;

    @ApiModelProperty("绿化率")
    @Column(name = "greening_rate")
    private String greeningRate;

    @ApiModelProperty("在售状态:[{sale_status:[待售,在售,售罄]}]")
    @Column(name = "sale_status")
    private String saleStatus;

    @ApiModelProperty("开盘时间")
    @Column(name = "opening_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date openingTime;

    @ApiModelProperty("入住时间")
    @Column(name = "check_in_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkInTime;

    @ApiModelProperty("物业费")
    @Column(name = "property_charges")
    private String propertyCharges;

    @ApiModelProperty("物业公司")
    @Column(name = "property_company")
    private String propertyCompany;

    @ApiModelProperty("")
    @Column(name = "building_company")
    private String buildingCompany;

    @ApiModelProperty("产权年限")
    @Column(name = "right_years")
    private String rightYears;

    @ApiModelProperty("均价")
    @Column(name = "average_price")
    private String averagePrice;

    @ApiModelProperty("物业地址经度")
    @Column(name = "property_longitude")
    private String propertyLongitude;

    @ApiModelProperty("物业地址纬度")
    @Column(name = "property_latitude")
    private String propertyLatitude;

    @ApiModelProperty("物业地址")
    @Column(name = "property_addr")
    private String propertyAddr;

    @ApiModelProperty("售楼部地址经度")
    @Column(name = "sale_longitude")
    private String saleLongitude;

    @ApiModelProperty("售楼部地址纬度")
    @Column(name = "sale_latitude")
    private String saleLatitude;

    @ApiModelProperty("售楼部地址")
    @Column(name = "sale_addr")
    private String saleAddr;

    @ApiModelProperty("")
    @Column(name = "discount")
    private String discount;

    @ApiModelProperty("")
    @Column(name = "commission")
    private String commission;

    @ApiModelProperty("奖励")
    @Column(name = "reward")
    private String reward;

    @ApiModelProperty("报备保护期")
    @Column(name = "reporting_days")
    private String reportingDays;

    @ApiModelProperty("交易保护类型(已到访记录)")
    @Column(name = "save_days_type")
    private String saveDaysType;

    @ApiModelProperty("交易保护时间")
    @Column(name = "save_days")
    private String saveDays;

    @ApiModelProperty("复访交易顺延开关")
    @Column(name = "repeat_delay_deal_time")
    private String repeatDelayDealTime;

    @ApiModelProperty("全景看房")
    @Column(name = "panoramic_view")
    private String panoramicView;

    @ApiModelProperty("项目经理")
    @Column(name = "manager")
    private String manager;

    @ApiModelProperty("联系方式")
    @Column(name = "mobile")
    private String mobile;

    @ApiModelProperty("合作开始时间")
    @Column(name = "cooperation_begin_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date cooperationBeginTime;

    @ApiModelProperty("合作结束时间")
    @Column(name = "cooperation_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date cooperationEndTime;

    @ApiModelProperty("")
    @Column(name = "cooperation_rule")
    private String cooperationRule;

    @ApiModelProperty("")
    @Column(name = "introduction")
    private String introduction;

    @ApiModelProperty("")
    @Column(name = "selling")
    private String selling;

    @ApiModelProperty("")
    @Column(name = "customer")
    private String customer;

    @ApiModelProperty("")
    @Column(name = "sale_skill")
    private String saleSkill;

    @ApiModelProperty("报备模板")
    @Column(name = "report_temp")
    private String reportTemp;

    @ApiModelProperty("封面图片地址")
    @Column(name = "url")
    private String url;

    @ApiModelProperty("楼盘状态:[{key:premises_status,values:[{no:0,alias:type0,remark:待审核},{no:1,alias:type1,remark:审核通过},{no:2,alias:type2,remark:已下架}]}]")
    @Column(name = "premises_status")
    private String premisesStatus;

    @ApiModelProperty("驻守人员ID")
    @Column(name = "partner_id")
    private Long partnerId;

    @ApiModelProperty("开发商ID")
    @Column(name = "company_id")
    private Long companyId;

    @ApiModelProperty("审核备注")
    @Column(name = "remark")
    private String remark;

    @ApiModelProperty("来源1:一手房源 2:海外房源")
    @Column(name = "from_source")
    private String fromSource;

    @ApiModelProperty("楼书附件地址")
    @Column(name = "ls_url")
    private String lsUrl;

    @ApiModelProperty("设计商")
    @Column(name = "design_company")
    private String designCompany;

    @ApiModelProperty("建筑商")
    @Column(name = "builder_company")
    private String builderCompany;

    @ApiModelProperty("房屋价格")
    @Column(name = "house_price")
    private String housePrice;

    @ApiModelProperty("距CBD")
    @Column(name = "from_cbd")
    private String fromCbd;

    @ApiModelProperty("距火车站")
    @Column(name = "from_hcz")
    private String fromHcz;

    @ApiModelProperty("距超市")
    @Column(name = "from_supermarket")
    private String fromSupermarket;

    @ApiModelProperty("距学校1")
    @Column(name = "from_school_1")
    private String fromSchool1;

    @ApiModelProperty("距学校2")
    @Column(name = "from_school_2")
    private String fromSchool2;

    @ApiModelProperty("距学校3")
    @Column(name = "from_school_3")
    private String fromSchool3;

    @ApiModelProperty("除房价以外费用")
    @Column(name = "additional_costs")
    private String additionalCosts;

    @ApiModelProperty("目标用户预算")
    @Column(name = "user_budget")
    private String userBudget;

    @ApiModelProperty("租金预估")
    @Column(name = "rent_estimate")
    private String rentEstimate;

    @ApiModelProperty("补充介绍")
    @Column(name = "introduces")
    private String introduces;

    @ApiModelProperty("总佣金比例")
    @Column(name = "commission_ratio")
    private BigDecimal commissionRatio;

    @ApiModelProperty("平台分佣比例")
    @Column(name = "pt_commission_ratio")
    private BigDecimal ptCommissionRatio;

    @ApiModelProperty("中介分佣比例")
    @Column(name = "zj_commission_ratio")
    private BigDecimal zjCommissionRatio;

    @ApiModelProperty("楼书名称")
    @Column(name = "ls_name")
    private String lsName;

    @ApiModelProperty("省份Id")
    @Column(name = "province_id")
    private Long provinceId;

    @ApiModelProperty("城市Id")
    @Column(name = "city_id")
    private Long cityId;

    @ApiModelProperty("报备保护时间")
    @Column(name = "visit_protect")
    private String visitProtect;

    @ApiModelProperty("楼盘标签")
    @Column(name = "code_name")
    private String codeName;

    @ApiModelProperty("结佣方式 1、签约结佣 2、按揭结佣")
    @Column(name = "commission_way")
    private String commissionWay;

    @ApiModelProperty("M2楼盘编号")
    @Column(name = "project_code_m2")
    private String projectCodeM2;

    @ApiModelProperty("最短报备时间(特殊报备)")
    @Column(name = "special_time")
    private String specialTime;

    @ApiModelProperty("是否删除，0-否，1-是")
    @Column(name = "del_flag")
    private String delFlag;

    @ApiModelProperty("成交奖")
    @Column(name = "deal_award")
    private String dealAward;

    @ApiModelProperty("佣金比例")
    @Column(name = "commission_rate")
    private String commissionRate;

    @ApiModelProperty("上下架状态，0:下架，1:上架")
    @Column(name = "shelves_status")
    private Long shelvesStatus;

    @ApiModelProperty("排列顺序")
    @Column(name = "sequence")
    private Long sequence;

    @ApiModelProperty("楼盘地址")
    @Column(name = "premises_address")
    private String premisesAddress;

    @ApiModelProperty("经度")
    @Column(name = "latitude")
    private String latitude;

    @ApiModelProperty("纬度")
    @Column(name = "longitude")
    private String longitude;

    @ApiModelProperty("成交类型，1：成交奖，2：现金奖")
    @Column(name = "deal_type")
    private String dealType;

    @ApiModelProperty("规划户数")
    @Column(name = "house_holds")
    private String houseHolds;

    @ApiModelProperty("地上车位数")
    @Column(name = "up_car_port")
    private String upCarPort;

    @ApiModelProperty("地下车位数")
    @Column(name = "down_car_port")
    private String downCarPort;

    @ApiModelProperty("报备保护时间单位类型")
    @Column(name = "visit_protect_type")
    private String visitProtectType;

    @ApiModelProperty("其他关联id")
    @Column(name = "estate_uuid")
    private String estateUuid;

    @ApiModelProperty("代理公司名称")
    @Column(name = "corporate_name")
    private String corporateName;

    @ApiModelProperty("")
    @Column(name = "corporate_Desc")
    private String corporateDesc;

    @ApiModelProperty("营销号")
    @Column(name = "marketing_number")
    private String marketingNumber;

    @ApiModelProperty("默认为空，1:取消,2:主推（排序用到）")
    @Column(name = "main_push")
    private Integer mainPush;

    @ApiModelProperty("主推设置时间")
    @Column(name = "main_push_settime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date mainPushSetTime;

    @ApiModelProperty("项目总监")
    @Column(name = "chief")
    private String chief;

    @ApiModelProperty("总监手机号")
    @Column(name = "chief_mobile")
    private String chiefMobile;

    @ApiModelProperty("最短报备时间类型：1-分钟，2-小时，3-天")
    @Column(name = "special_time_type")
    private String specialTimeType;

    @ApiModelProperty("到访延长时间限制开关：0-关  1-开")
    @Column(name = "visit_protect_switch")
    private Integer visitProtectSwitch;

    @ApiModelProperty("重复报备开关：0-关  1-开")
    @Column(name = "repeat_report_flag")
    private Integer repeatReportFlag;

    @ApiModelProperty("报备保护时间类型：1-分钟，2-小时，3-天")
    @Column(name = "report_protect_type")
    private String reportProtectType;

    @ApiModelProperty("报备保护时间")
    @Column(name = "report_protect")
    private String reportProtect;

    @ApiModelProperty("报备方式")
    @Column(name = "report_way")
    private String reportWay;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty("公司")
    @Transient
    private String companyName;

    @ApiModelProperty("是否有推荐人")
    @Column(name = "has_recommender")
    private String hasRecommender;

}
